package com.mvm.store.service.impl;

import org.springframework.transaction.annotation.Transactional;

import com.mvm.store.domain.obj.User;
import com.mvm.store.service.UserService;
import com.mvm.store.service.base.AbstractServiceImpl;

@Transactional
public class UserServiceImpl extends AbstractServiceImpl<User, Integer> implements UserService {

	@Override
	public void save(User user) {

		if (user.getUserName() == null) {
			// new
			getDao().save(user);
		} else {
			// update
			getDao().update(user);
		}
	}

}
